#!/bin/bash

curl -sL https://gitee.com/moonnow/sh/raw/master/echo/echo-35.sh | bash -s 'pro >>> 开始打包'

cd /deploy/rely
git checkout .
sleep 1
git pull
sleep 1
cd /deploy/tool
git checkout .
sleep 1
git pull
sleep 1
cd /deploy/cron
git checkout .
sleep 1
git pull
sleep 1
cd /deploy/sign
git checkout .
sleep 1
git pull
sleep 1
cd /deploy/dict
git checkout .
sleep 1
git pull
sleep 1
cd /deploy/conf
git checkout .
sleep 1
git pull
sleep 1
cd /deploy/dirs
git checkout .
sleep 1
git pull
sleep 1
cd /deploy/act
git checkout .
sleep 1
git pull
sleep 1
cd /deploy/pro
git checkout .
sleep 1
git pull
sleep 1

cd /deploy/rely
mvn clean install
sleep 1
cd /deploy/tool
mvn clean install
sleep 1
cd /deploy/cron
mvn clean install
sleep 1
cd /deploy/sign
mvn clean install
sleep 1
cd /deploy/dict
mvn clean install
sleep 1
cd /deploy/conf
mvn clean install
sleep 1
cd /deploy/dirs
mvn clean install
sleep 1
cd /deploy/act
mvn clean install
sleep 1
cd /deploy/pro
mvn clean install
sleep 1

cd /deploy/vuepro
git checkout .
sleep 1
git pull
sleep 1

cd /deploy/vuepro
rm -rf dist.tar.gz
rm -rf dist
sleep 1

yarn build
sleep 1

tar -zcvf dist.tar.gz dist
sleep 1

curl -sL https://gitee.com/moonnow/sh/raw/master/echo/echo-32.sh | bash -s 'pro >>> 打包完成'
